Have a problem with PrintSection (doesn’t appear), after duplicating a form, to be used as model / base for a new print.
So, some extracts of code and the points that doesn’t work with comment:
----------
#region Printing Layouts
Printing.DecomptesPro_formaSceneContenuDecomptes _layout;
Printing.DecomptesPro_formaSceneContenuDecomptes2 _layout2; <= new, created by duplicate the first form and adapted the content
#endregion
...
InitializeDataView();
_layout = new Printing.DecomptesPro_formaSceneContenuDecomptes(this);
_layout2 = new Printing.DecomptesPro_formaSceneContenuDecomptes2(this); <= new one
//… etc. for each language
...
//ONLOAD
Streams.Add(_ioDecomptesMembres);
_layout.Reset();
_layout2.Reset(); <= new one
...
//Group_Enter()
if (Exp_FR()) <= for now, always true
{
_ioDecomptesMembres.NewPage();
if (u.Trim(THE_NOS_DECOMPTES.IPI_MEMBRE_NO.Value) != "") <= true
{
_layout.EnteteF.WriteTo(_ioDecomptesMembres); <= this one is not all the time printed, even the debug stop there, and in the designer code,
I can see the _ioDecomptesMembres.HeightForLineFunc
with the value of EnteteF length when printed, and still zero in other case …
}
else
{
_layout.EnteteF_Soc.WriteTo(_ioDecomptesMembres);
}
}
...
//OnLeaveRow()
if (Exp_FR())
{
_layout.DetailF.WriteTo(_ioDecomptesMembres); <= this one is not all the time printed, same zero still in the current length
}
...
if (Exp_FR())
{
_layout.LigneVideF.WriteTo(_ioDecomptesMembres); <= this one is all the time printed, no problem, and length is also updated
}
...
//Group_Leave()
if (Exp_FR())
{
if (MontantTotalMembre >= 0) <= true
{
_layout.PiedDecompteF.WriteTo(_ioDecomptesMembres); <= this one is all the time printed, no problem, and length is also updated
}
if (MontantTotalMembre < 0)
{
_layout.PiedCorrectionDecompteF.WriteTo(_ioDecomptesMembres);
}
}
----------
At the end, the PDF content is only : LigneVideF + PiedDecompteF (file1,pdf)
Instead of : EnteteF + DetailF + LigneVideF + PiedDecompteF (file2.jpg, image because of content to be hide)
Any idea on the reason ?
How to debug this ?
I already tried to completely change names, form/class and inside the different areas … no success.
It appeared after I duplicated the form, even content was adapted, so the compilation is 100%
Thanks in advance, regards,
Ben
Have a problem with PrintSection (doesn’t appear), after duplicating a form, to be used as model / base for a new print.