web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

New Data Source on existing SSRS report

(0) ShareShare
ReportReport
Posted on by 304

Hi,

I'm customizing the VendInvoiceDocument report (pre forma invoice), I make a new duplicate report (VendInvoiceDocumentCopy), I set up the print management to see my new report, it was working fine.

At some point I needed to add a new data source, I created the table, the classes and the functions that will fill my new data source. Building the project goes without errors and also syncing, I build the whole model (PreFormaInvoice) and it's also okay.

The problem is when I deploy the report. I got this error " An error occurred while deploying the report VendInvoiceDocumentCopy.Report, PreFormaInvoice.
This might be because the SQL Server Reporting Services has not been installed, or is not configured correctly.
  System.Web.Services.Protocols.SoapException: The number of defined parameters is not equal to the number of cell definitions in the parameter panel.
   at Microsoft.ReportingServices.Library.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[ Definition, Property[ Properties, Guid batchId, Warning[& Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[ Definition, Property[ Properties, Warning[& Warnings)
Deploying rdl files for report VendInvoiceDocumentCopy failed."

When I open the data source I found out that there're 2 new parameters differs from the original datasource, CreationTransacionId and languageID, I looked online and it said that I had to enable these options on my new table (CreatedBy, Created TransactionId), I did, I also made almost all my properties in my new table looks like the original table.

I looked it over in the event viewer and I get this "SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x289fd3a2; actual: 0x83a12aef). It occurred during a read of page (1:512) in database ID 11 at offset 0x00000000400000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\ManagementReporter.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.", when I try to open the management reports database on my SQL it gives me the same error, and no more helpful info.

Some people said online it might be anonymous authentication, I checked it and it's enabled, other says like the message it's a configuration thing, but when I delete my new data source it works fine, and this problem actually doesn't appear in any other place.

That the code I added, and prepost eventhandler method on the processReport method

[ExtensionOf(classStr(VendInvoiceDocumentDP))]
final class VendInvoiceDocumentDP_Extension
{
    public myVendInvoiceDocumentTmp     myVendInvoiceDocumentTmp;

    [SRSReportDataSetAttribute(tableStr(myVendInvoiceDocumentTmp))]
    public myVendInvoiceDocumentTmp getMyVendInvoiceDocumentInfo()
    {
        select myVendInvoiceDocumentTmp;
        return myVendInvoiceDocumentTmp;
    }

}
class myVendInvoiceDocumentDP
{

    [PreHandlerFor(classStr(VendInvoiceDocumentDP), methodStr(VendInvoiceDocumentDP, processReport))]
    public static void VendInvoiceDocumentDP_Pre_processReport(XppPrePostArgs args)
    {
        VendInvoiceDocumentDP	    venInvDocDP = args.getThis();
        VendInvoiceDocumentTmp      vendInvoiceDocTmp = venInvDocDP.getVendInvoiceDocumentTmp();
        MyVendInvoiceDocumentTmp	myVenInvDocTmpTable;

        ;


        ttsbegin;
        myVenInvDocTmpTable.clear();
        myVenInvDocTmpTable.InvoiceId = "inv1";
        myVenInvDocTmpTable.ItemId = "item1";
        myVenInvDocTmpTable.insert();
        ttscommit;

    }
}

I have the same question (0)
  • Martin Dráb Profile Picture
    237,978 Most Valuable Professional on at

    I've seen the error "The number of defined parameters is not equal to the number of cell definitions in the parameter panel" before. And after spending a lot of time with it, the best I was able to do is manually editing the underlaying RDL file. If I remember it correctly, I merely deleted the whole ReportParametersLayout node.

    But I'm not sure if your situation is the same.

    By the way, why are you still using PreHandlerFor? Isn't Chain of Command (CoC) easier to use, safer and more powerful?

    Also, you shouldn't make class variables public (as you did with myVendInvoiceDocumentTmp).

  • saffarini Profile Picture
    45 on at

    after facing the "The number of defined parameters is not equal to the number of cell definitions in the parameter panel." it is better to delete the report and create new one with deferent name , i was keep adding numbers for each new report RDL like XYZnewReport1,XYZnewReport2...XYZnewReport5.

    the report is stored in the DB so you cant modify it manually in D365, and once you face that problem, its like it is stored in the DB, sync and rebuild the project don't effect the number of params in the report if its had this problem, so create new one with added number and try again.

    that what worked form me.

  • KareemTaima Profile Picture
    304 on at

    Thank you Martin for your response,

    you're right, COC is a better choice

    At the end, I decided to create a new report from scratch

  • KareemTaima Profile Picture
    304 on at

    Thank you saffarini for your response,

    I decided indeed to create new one suits me

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans