Skip to main content
Solved

Need help with a subreport - Report Designer


I have a client that would like to view all of their fixed assets and their calculated depreciation for the next 12 months in a single report. I have edited a copy of the Fixed Asset Balance report (FA630000) and I made a custom report (FA63001D) to use as a subreport that will list the financial period, calculated depreciation, and YTD calculated deprecation. 

 

The subreport takes 2 parameters: [FixedAsset.AssetCD] and [FABookBalance.BookID]. Passing the BookID works fine but for some reason it doesn’t like how the AssetCD is passed to the subreport. If I hardcode a value for it like 1000-001, it works but I want it to run the subreport for each asset in the main report. I’ve also tried basing the subreport on [FixedAsset.AssetID] but this gives the same result. The stack trace only gives this for a SQL message: 

 @@DBTS, IDENT_CURRENT('WatchDog') OPTION (OPTIMIZE FOR UNKNOWN)/*  */

 

 

Best answer by dgranger70

@Nilkanth Dipak ​@BenjaminCrisman I figured this out. There was an issue with variable definitions in the subreport. I was trying to assign a variable to CInt(Substring([FABookHistory.FinPeriod]), 0, 2) for visibility logic and kept getting an “Input string was not in the correct format” exception. Removing CInt() fixed the issue. 

View original
Did this topic help you find an answer to your question?

9 replies

BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4

@dgranger70 In your subreport do you have a parameter for AssetID or AssetCD defined? I did a quick mockup and all I did was add the AssetID to the subreport and the associated filter conditions and it worked:

Then in the main report:

Printed:

 


  • Author
  • Freshman II
  • 5 replies
  • April 9, 2025

@BenjaminCrisman yes, I do. I’m able to run my subreport by itself, it just won’t run in the main report. 

 


BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4

@dgranger70 I don’t think that FixedAsset.AssetCD has a schema, so I think you need to remove the function on the View Name in the subreport. Typically, views will not be necessary for subreports since it’s just inserting specific data and since the subreport is not typically ran independently there is no need to use actual selectors. Otherwise I may need to check the reports locally to see if I could get them to work


Nilkanth Dipak
Semi-Pro II
Forum|alt.badge.img+10

Hi ​@dgranger70,

You are using AssetCD instead of AssetID. Please replace AssetCD with AssetID.
 

Hope, it helps!


  • Author
  • Freshman II
  • 5 replies
  • April 9, 2025

@Nilkanth Dipak Thanks for the suggestion! I’ve tried it both ways and I’m getting the same error. 


  • Author
  • Freshman II
  • 5 replies
  • April 9, 2025
BenjaminCrisman wrote:

@dgranger70 I don’t think that FixedAsset.AssetCD has a schema, so I think you need to remove the function on the View Name in the subreport. Typically, views will not be necessary for subreports since it’s just inserting specific data and since the subreport is not typically ran independently there is no need to use actual selectors. Otherwise I may need to check the reports locally to see if I could get them to work

I removed the functions from the view name and I’m still getting the same error. 


  • Author
  • Freshman II
  • 5 replies
  • April 9, 2025

Also, I’ve noticed that it works just fine in the preview window in report designer. 


  • Author
  • Freshman II
  • 5 replies
  • Answer
  • April 14, 2025

@Nilkanth Dipak ​@BenjaminCrisman I figured this out. There was an issue with variable definitions in the subreport. I was trying to assign a variable to CInt(Substring([FABookHistory.FinPeriod]), 0, 2) for visibility logic and kept getting an “Input string was not in the correct format” exception. Removing CInt() fixed the issue. 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2809 replies
  • April 14, 2025

Thank you for sharing your solution with the community ​@dgranger70!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings